home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 5 / SHOW_HEL / MAIN.C < prev    next >
C/C++ Source or Header  |  1991-12-27  |  961b  |  38 lines

  1. #define BASE_RES_ID        128
  2. #define BASE_PICT_ID    1000
  3. #define REMOVE_ALL_EVENTS 0
  4. #define NIL                0L
  5.  
  6. void ToolBoxInit( void );
  7. void main( void );
  8.  
  9. /* ------------------------------------------------------------------ */
  10. void main()
  11. {
  12.     pascal void (*Show_help)( short help_dlog_id, StringPtr help_text_name,
  13.         short base_pict_id, StringPtr default_filename,
  14.         StringPtr default_menuname );
  15.     Handle    help_CUST;
  16.  
  17.     ToolBoxInit();
  18.     help_CUST = Get1NamedResource( 'CUST', "\pShow_help" );
  19.     HLock( help_CUST );
  20.     Show_help = (pascal void (*)(short, StringPtr, short, StringPtr, StringPtr))
  21.                 StripAddress( *help_CUST );
  22.     (*Show_help)( BASE_RES_ID, "\phelp", BASE_PICT_ID,
  23.         "\pShow_help help", "\pTitle page");
  24. }
  25.  
  26. /* ------------------------------------------------------------------ */
  27. void ToolBoxInit()
  28. {
  29.     InitGraf( &thePort );
  30.     InitFonts();
  31.     FlushEvents( everyEvent, REMOVE_ALL_EVENTS );
  32.     InitWindows();
  33.     InitMenus();
  34.     TEInit();
  35.     InitDialogs( NIL );
  36.     InitCursor();
  37. }
  38.